<template>
  <div class="outer">
    <h1>分类列表</h1>
    <div class="list">
      <Item v-for="item in dataList" :key="item.id" v-bind="item">
        <template v-slot:list="{ content }">
          <ul>
            <li v-for="item in content" :key="item">{{ item }}</li>
          </ul>
        </template>
      </Item>
    </div>
  </div>
</template>

<script>
import Item from "./components/Item.vue";

export default {
  name: "App",
  components: { Item },
  data() {
    return {
      dataList: [
        {
          id: "001",
          content: ["热干面", "酸辣粉", "蛋炒饭"],
          title: "美食",
        },
        {
          id: "002",
          content: ["七里香", "屋顶", "求佛"],
          title: "音乐",
        },
        {
          id: "003",
          content: ["DNF", "LOL", "CF"],
          title: "游戏",
        },
      ],
    };
  },
};
</script>

<style scoped>
.outer {
  width: 900px;
  margin: 0 auto;
}
.list {
  display: flex;
  justify-content: space-between;
}
</style>